<template>
    <div class="toast" v-if="flag">
        <div class="toast-text">{{msg}}</div>
    </div>
</template>
<script>
export default {
    props:{
        msg:{
            type: String,
            default:'暂时没有数据'
        }
    },
    data(){
        return {
            flag: false
        };
    },
    methods:{
        open(){
            this.flag = true;
        },
        close(){
            this.flag = false;
        }
    }
}
</script>

<style lang="scss" scoped>
    @import "~assets/css/mixin.scss";
    .toast {
        position: fixed;
        top: 50%;
        left:50%;
        transform: translate3d(-50%,-50%,0);
        // border: 1px solid;
        width: rem(250);
        height: rem(30);
        text-align: center;
        line-height: rem(30);
        font-size: rem(17);
        // background-color: gray;
        color: #ffffff;
        border-radius: rem(5);
    background-color: #85898D;
        z-index:99999;
    }
    
</style>


